home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / oath.lha / oath / test / bisqr.cc < prev    next >
C/C++ Source or Header  |  1991-08-29  |  728b  |  25 lines

  1. #include "oath/bigInteger.h"
  2.  
  3. #include <iostream.h>
  4.  
  5. main(int argc, char **argv)
  6.    {if(argc != 2)
  7.        {cout << argv[0] << " reads a bigInteger and produces squares.\n";
  8.         cout << "Usage: " << argv[0] << " <integer>\n";
  9.         exit(1);
  10.        }
  11.  
  12.     bigIntegerA X = bigIntegerA::make(argv[1]);
  13.  
  14.     cout << "       X = " << X << endl;
  15.  
  16.     cout << "X.sqr () = " << X.sqr () << endl;
  17.     cout << "X.sqr () = " << X.sqr () << endl;
  18.     cout << "X.sqr () = " << X.sqr () << endl;
  19.     cout << "X.sqrt() = " << X.sqrt() << endl;
  20.     cout << "X.sqrt() = " << X.sqrt() << endl;
  21.     cout << "X.sqrt() = " << X.sqrt() << endl;
  22.     cout << "X.sqrt() = " << X.sqrt() << endl;
  23.     cout << "X.sqrt() = " << X.sqrt() << endl;
  24.    }
  25.